package com.tbit.manager.api;

import com.tbit.common.entity.pojo.dto.ReturnBikeMsgLogDTO;
import com.tbit.common.entity.pojo.vo.ParkPointCoreDataVO;
import com.tbit.common.entity.pojo.vo.ReturnBikeMsgLogVO;
import com.tbit.common.entity.pojo.vo.HeatMapStatVO;
import com.tbit.manager.enums.ApiConstants;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Date;
import java.util.List;

/**
 * 运营分析-站点分析
 *
 * @author ：zhangtianyou
 * @since 2025/3/13
 */
@FeignClient(name = ApiConstants.NAME)
public interface ParkPointOAServiceApi {

    String PREFIX = ApiConstants.PREFIX + "/operationsAnalysis/parkPoint";

    /**
     * 获取站点分析核心数据
     *
     * @param accountId 区域id
     * @param startTime 开始时间
     * @param endTime   结束时间
     */
    @GetMapping(PREFIX + "/getCoreData")
    ParkPointCoreDataVO getCoreData(@RequestParam("accountId") Integer accountId, @RequestParam("startTime") Date startTime,
                                    @RequestParam("endTime") Date endTime);

    /**
     * 获取申诉还车点
     *
     */
    @PostMapping(value = PREFIX + "/getApplyReturnBikePoint", consumes = "application/json", produces = "application/json")
    List<ReturnBikeMsgLogVO> getApplyReturnBikePoint(@RequestBody ReturnBikeMsgLogDTO returnBikeMsgLogDTO);

    /**
     * 站点热力图统计
     *
     * @param accountId 区域id
     * @param startTime 开始时间 字符串(yyyy-MM-dd HH:mm:ss)
     * @param endTime   结束时间 字符串(yyyy-MM-dd HH:mm:ss)
     * @param type      类型 0: 借车 1: 还车
     * @param mapType   地图类型 1: 百度 2: 高德
     * @param regionIds 分区id 英文逗号拼接
     */
    @GetMapping(PREFIX + "/statHeatMap")
    List<HeatMapStatVO> statHeatMap(@RequestParam("accountId") Integer accountId, @RequestParam("startTime") long startTime,
                                    @RequestParam("endTime") long endTime, @RequestParam("type") Integer type,
                                    @RequestParam("mapType") Integer mapType,
                                    @RequestParam(required = false, value = "regionIds") String regionIds);
}
